﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NthDownload.Contracts.Plugins.Downloads;
using System.IO;
using System.Net;

namespace NthDownload.DownloadPlugins.Http
{
    public class HttpDownloadStream : IDownloadStream
    {
        #region Constructors

        public HttpDownloadStream(Stream stream, HttpWebResponse response)
        {
            Stream = stream;
            Response = response;
        }

        #endregion Constructors

        #region Properties

        public Stream Stream { get; set; }
        public HttpWebResponse Response { get; set; }

        #endregion Properties

        #region Methods

        public void Close()
        {
            Response.Close();
            Stream.Close();
        }

        #endregion Methods
    }
}
